package net.zui.action;

import java.awt.event.WindowEvent;
import java.awt.event.WindowFocusListener;
import java.awt.event.WindowListener;
import java.awt.event.WindowStateListener;

import net.zui.Manager;
import net.zui.comp.ZBaseFrame;

public class ZWindowAction implements WindowFocusListener, WindowListener, WindowStateListener {
	private ZBaseFrame frame;

	public ZWindowAction(ZBaseFrame frame) {
		this.frame=frame;
		this.frame.addWindowFocusListener(this);
		this.frame.addWindowListener(this);
		this.frame.addWindowStateListener(this);
	}

	@Override
	public void windowStateChanged(WindowEvent e) { }

	@Override
	public void windowOpened(WindowEvent e) { }

	@Override
	public void windowClosing(WindowEvent e) {
		Manager.hide(frame);
	}

	@Override
	public void windowClosed(WindowEvent e) { }

	@Override
	public void windowIconified(WindowEvent e) { }

	@Override
	public void windowDeiconified(WindowEvent e) { }

	@Override
	public void windowActivated(WindowEvent e) { }

	@Override
	public void windowDeactivated(WindowEvent e) { }

	@Override
	public void windowGainedFocus(WindowEvent e) { }

	@Override
	public void windowLostFocus(WindowEvent e) { }
}
